<!doctype html>
<html class="no-js">
<head>
    <link rel="stylesheet" href="${rootPath!''}/assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="${rootPath!''}/assets/css/admin.css">
</head>
<body style="width: 100%;height: 100%;">
<!-- content start -->
<div class="admin-content">

    <!-- 导航 开始 -->
    <div class="am-cf am-padding">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">代金劵</strong> / <small></small></div>
    </div>
    <!-- 导航 结束 -->

    <!-- 功能键和导航 开始 -->
    <div class="am-g">

        <!-- 左边，功能键开始 -->
        <div class="am-u-sm-12 am-u-md-6">
            <div class="am-btn-toolbar">
                <div class="am-btn-group am-btn-group-xs">
                    <%if(so.hasPermission("IdentifyingCodeController.addCode")){%>
                    <button onclick="openModalCode();" type="button" class="am-btn am-btn-success"><span class="am-icon-plus"></span> 添加代金劵</button>
                    <%}%>
                    <button onclick="openVipCode();" type="button" class="am-btn am-btn-success"><span class="am-icon-plus"></span> 发放vip</button>
                </div>
            </div>
        </div>
        <!-- 左边，功能键结束 -->
        <form action="${rootPath}/identifying/code" method="get">
            <div class="am-u-sm-12 am-u-md-3">
                <div class="am-input-group am-input-group-sm">
                    <input type="text" class="am-form-field" id="keyWord" name="keyWord" value="${keyWord!}">
	          		<span class="am-input-group-btn">
	            		<button class="am-btn am-btn-default" type="submit">搜索</button>
	          		</span>
                </div>
            </div>
        </form>
    </div>
    <!-- 功能键和导航 结束 -->

    <!-- 内容 开始 -->
    <div class="am-g">
        <div class="am-u-sm-12">

            <form class="am-form">
                <table class="am-table am-table-striped am-table-hover table-main">
                    <thead>
                    <tr class="am-active">
                        <th class="table-check"><input type="checkbox" onclick="checkbox( this.checked ,'checkbox_list')" /></th>
                        <th class="table-title">验证码</th>
                        <th class="table-title">绑定用户</th>
                        <th class="table-title">生成时间</th>
                        <th class="table-title">使用时间</th>
                        <th class="table-title">到期时间</th>
                        <th class="table-title">类型</th>
                        <th class="table-title">状态</th>
                    </tr>
                    </thead>
                    <tbody>
                    <%
                    for(data in list.list){
                    %>
                    <tr>
                        <td><input type="checkbox" value="${data.code}" class="checkbox_list" /></td>
                        <td> ${data.code} </td>
                        <td> ${data.mobile} </td>
                        <td> ${data.createTime} </td>
                        <td> ${data.useTime} </td>
                        <td> ${data.expTime} </td>
                        <td> ${data.count==0?'vip劵':(data.count+'次劵') } </td>
                        <td> ${data.state==1?'未使用':(data.state==2?'已使用':'过期')} </td>
                    </tr>
                    <%}%>
                    </tbody>
                </table>
            </form>

            <!-- 分页 开始 -->
            <div class="am-cf" id="page"><input type="hidden" id="pageValue" value="${list.totalRow}_${list.pageSize}_${list.pageNumber}_5_${rootPath}/identifying/code/"> </div>
            <!-- 分页 结束 -->

        </div>
    </div>
</div>
<!-- content end -->
<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="${rootPath}/assets/js/polyfill/rem.min.js"></script>
<script src="${rootPath}/assets/js/polyfill/respond.min.js"></script>
<script src="${rootPath}/assets/js/amazeui.legacy.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="${rootPath}/assets/js/jquery.min.js"></script>
<script src="${rootPath}/assets/js/amazeui.min.js"></script>
<!--<![endif]-->
<script src="${rootPath}/assets/js/app.js"></script>
<script src="${rootPath}/ext/js/page.js"></script>
<script type="text/javascript">
    function openModalCode(){
        window.top.openModalCode();
    }
    function openVipCode(){
        window.top.openVipCode();
    }
</script>
</body>
</html>